<div class="login">
          <div class="wrap">
				<ul class="breadcrumb breadcrumb__t"><a class="home" href="<?php echo base_url();?>">Home</a>  / You are logged in as <?php echo $this -> mod_account -> get_logged_in_user_info() -> email;?> </ul>
				<div class="section group">
					<?php $this -> load -> view(F_MASTER . "dashboard_account"); ?>
				   
				    <div class="cont span_2_of_about">
				    	<h3>Product management for buy</h3><a href="<?php echo base_url();?>account/post-product"><button class="btn btn-primary" style="float: right;"><span class="glyphicon glyphicon-plus"></span> New Product</button></a>
				    	<div style="clear: both;"></div>
				    	<br />
				    	<table class="table table-bordered">
				    		<tr class="info">
				    		<th>#</th>
				    		<th>Product Name</th>
				    		<th>Price</th>
				    		<th>Image</th>
				    		<th>Action</th>
				    		</tr>
				    		<?php
				    			if($products->num_rows()>0){
				    				$i=1;
					    			foreach($products->result() as $row){
					    				$product_id=$row->product_id;
										$name=$row->pro_name;
										$price=$row->price;
										$desc=$row->description;
										$img=$row->img_name;
								?>
										<tr align="center">
							    			<td><?php echo $i;?></td>
							    			<td><?php echo str_replace("_", " ", $name);?></td>
							    			<td>$<?php echo $price;?></td>
							    			<td><img src="<?php echo base_url().F_IMG.$img;?>" class="img-circle" width="160"/></td>
							    			<td>
							    				<a href="<?php echo base_url();?>account/update-product/<?php echo str_replace(' ', '-', $name)."PID".$product_id;?>" class="btn btn-primary"><span class="glyphicon glyphicon-edit"></span> Edit</a>
							    				<a href="<?php echo base_url();?>account/delete-product/<?php echo str_replace(' ', '-', $name)."PID".$product_id;?>" onclick="return confirm('Are you sure want to delete this product?')" class="btn btn-danger"><span class="glyphicon glyphicon-remove"></span>Delete</a>
							    			</td>
							    		</tr>
								<?php
										$i++;
					    			}
					    		
				    			}else{
				    				echo '<tr><td colspan="5">There is no product post for buy in your list</td></tr>';
				    			}
				    			?>	
				    	</table>  
				    	<h2><?php echo $pagination;?></h2>
					</div>
           </div>
		   <div class="clear"></div>	
		  </div>
	</div>	
   